from langchain_core.callbacks.manager import CallbackManager
from langchain_core.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain_community.llms import Ollama

llm = Ollama(
    model="llama3.1:8b",
    callback_manager=CallbackManager([StreamingStdOutCallbackHandler()]),
)
llm("Tell me about the history of AI.")
